<!--
 * @Author: wangjh wangjiahui0710@163.com
 * @Date: 2024-07-10 09:19:29
 * @LastEditors: wangjh wangjiahui0710@163.com
 * @LastEditTime: 2024-07-15 15:19:11
 * @FilePath: \cip-admin\src\pages\company\information\third-party-company\components\sheet-item.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!-- 表格内容,此组件还用于生成导出文件,所以不应该依赖vue组件相关的上下文 -->
<script lang="ts" setup>
import {
	getEnumOptionsField,
	THIRD_UNIT_TRAIN_STATUS_OPTIONS,
	THIRD_LEVEL_OPTIONS,
} from "@/config/enum-options";

defineOptions({ name: "SheetItem" });
</script>

<template>
	<el-table-column label="序号" width="60" type="index" fixed="left" />
	<el-table-column label="单位名称" prop="name" />
	<el-table-column label="类别" prop="type" />
	<el-table-column label="主要负责人" prop="masterName" />
	<el-table-column label="负责人联系电话" prop="masterPhone" />
	<el-table-column v-slot="{ row }" label="资质等级" prop="qualificationLevel">
		<el-text>
			{{ THIRD_LEVEL_OPTIONS[row.qualificationLevel].label }}
		</el-text>
	</el-table-column>
	<el-table-column label="邮箱" prop="email" />
	<el-table-column label="单位详细地址" prop="address" />
	<el-table-column v-slot="{ row }" label="培训状态" prop="trainStatus">
		<span
			:style="{
				color: getEnumOptionsField(
					THIRD_UNIT_TRAIN_STATUS_OPTIONS,
					'color',
					row.trainStatus,
				),
			}"
		>
			{{
				getEnumOptionsField(
					THIRD_UNIT_TRAIN_STATUS_OPTIONS,
					"label",
					row.trainStatus,
				)
			}}
		</span>
	</el-table-column>
</template>
